<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>layui</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link href="/plugins/bootstrap/css/icon.css" rel="stylesheet"/>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css"/>
    <style>
        body {
            padding: 16px;
        }
    </style>
</head>
<body>


<blockquote class="layui-elem-quote">
    使用提示：) (若要使用户不具有某权限，需显式的设置权限菜单对用户可见性) 右侧菜单栏目前支持三级
</blockquote>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>菜单信息</legend>
</fieldset>
<form id="app" class="layui-form" action="">
    <div v-if="isChild" class="layui-form-item">
        <label class="layui-form-label">父级菜单</label>
        <div class="layui-input-block">
            <input type="text" autocomplete="off" disabled="disabled"
                   class="layui-input" :value="obj.p_name"/>
        </div>
        <div class="layui-input-block" style="display: none">
            <input type="text" name="pid" autocomplete="off"
                   class="layui-input" :value="obj.p_id"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="name" autocomplete="off" placeholder="请输入菜单名称"
                   class="layui-input" :value="obj.name"/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">地址链接</label>
        <div class="layui-input-block">
            <input type="text" name="url" placeholder="请输入" class="layui-input" :value="obj.url"/>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">描述</label>
        <div class="layui-input-block">
            <textarea name="description" placeholder="请输入内容" class="layui-textarea">{{obj.description}}</textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">

        <div v-if="obj.sort!=null" class="layui-inline">
            <label class="layui-form-label">排序数字</label>
            <div class="layui-input-inline">
                <input type="number" name="sort" lay-verify="sort" autocomplete="off" class="layui-input"
                       :value="obj.sort"/>
            </div>
        </div>
        <div v-if="obj.sort!=null" class="layui-inline">
            <label class="layui-form-label">用户可见</label>
            <div class="layui-input-inline">
                <input type="checkbox" id="visible" name="visible" value="1" title="可见"/>
            </div>
        </div>

    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">图标
                <i :class="icon"></i></label>
            <div class="layui-input-inline" v-on:click="click_icon">
                <input type="text" name="icon" class="layui-input" :value="icon" v-model="icon" style="background-color: #eee;"/>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">权限标识</label>
            <div class="layui-input-inline">
                <input type="text" name="permission" class="layui-input" :value="obj.permission"/>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<input id="json" type="text" style="display: none" value="{}"/>

<script src="/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="/plugins/vue/vue.min.js"></script>
<script src="/plugins/moment/moment.min.js"></script>
<script src="/plugins/layui/layui.js"></script>
<script src="https://cdn.bootcss.com/jquery.form/3.51/jquery.form.min.js"></script>
<script src="/dists/js/config.js"></script>
<script src="/dists/js/pages/menu_frame_page.js">
</script>
</body>
</html>